<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <title>dome</title>
    <link rel="stylesheet" href="../reset.css">

    <style type="text/css">
        body{background: #9cdff2;}
         iframe{width: 220px; height: 244px;  position: relative; z-index: 2;
              
         }
        
    </style>

</head>
<body >
<iframe id="ifm" src="iframe.html"  frameborder="0" allowTransparency="transparent"   >
     
</iframe>
<textarea name="" id="" cols="30" rows="10">asdf</textarea>
<script type="text/javascript">
var abc=1234;
    function rewite(iframes){
          //重写
      //iframes.document.designMode = 'on';
      //iframes.document.contentEditable = true;
        iframes.document.open();
        iframes.document.writeln('<html><head>');
        iframes.document.writeln('<style>body {background:#ccc;font-size:9pt;margin: 2px; padding: 0px;}</style>');
        iframes.document.writeln('</head><body>这个是重写的、</body></html>');
        iframes.document.close();
    }
    function access(){
         var iframes=document.getElementById('ifm').contentWindow;
        var divs=iframes.document.getElementsByTagName('div');
      
        
        var abc=iframes.abc;
       // alert(iframes.document.body.innerHTML)
        setTimeout(function(){
            try{
                if(!iframes.abc){

            }
                console.dir(iframes)
            }catch(e){

            }
        },1000);
    }
    window.onload=function(){
       //访问
       access();



    }


 
</script>
 
</body>
</html>